#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QThread>
#include <QTimer>

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    if (QtDockTile::isAvailable())
        dock = new QtDockTile(this);
    QTimer::singleShot(100, [this](){
        if (dock) {
            for (int idx =0 ;idx < 100; idx++) {
                QThread::sleep(1);
                dock->setProgress(idx);
                dock->setBadge(idx);

            }
        }
    });
}

MainWindow::~MainWindow()
{
    delete ui;
}

